package com.sudo.dao.admin.model.bo;

import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author 为道日损 2020-06-12 13:32
 * webSite：https://www.sudo.ren
 */
public class SimpleUserBO {

    @NotBlank(message = "用户昵称不能为空")
    private String nickName;

    @NotBlank(message = "用户账号不能为空")
    @Length(min = 4, max = 10, message = "账号必须由4~10个字符组成")
    @Pattern(regexp="[0-9A-Za-z_]{4,10}",message="账号必须是4~10位数字、字母或下划线")
    private String username;

    @NotBlank(message = "用户密码不能为空")
    @Length(min = 6, max = 10, message = "密码必须由4~10个字符组成")
    @Pattern(regexp="[0-9A-Za-z_]{6,10}",message="密码必须是6~10位数字、字母或下划线")
    private String password;

    @NotBlank(message = "角色不能为空")
    @Pattern(regexp="[0-9A-Za-z_]{4,15}",message="账号必须是4~15位数字、字母或下划线")
    private String roleCode;

    @Length(max = 255,message = "备注最大长度不超过255位")
    private String note;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }
}
